<template lang="pug">
.px-4.mb-4
  .switch-btn
    .btn(v-for="item in typeList" :key="item" @click="activeType=item" :class="[item==activeType?'active':'']") {{item}}
.px-4
  .flex.gap-4
    uni-easyinput(placeholder="搜索报价单名称或者客户名称" primaryColor="#B59E6D" )
    .option-btn 搜索
.baojia-warp
  .baojia-box.mb-3(v-for="(item,i) in baojiaList" :key="i" @click="toDetail")
    .name {{item.name}}
    view
    .kehu 客户：{{item.kehu}}
    .date.pt-1.text-right {{item.date}}
</template>
<script setup>
const typeList=[
  "待提交",'待审核','已审核'
]
const activeType = ref("待提交")

const baojiaList = ref([
  {name:'xx酒店',kehu:'张三',date:"2024-11-11"},
  {name:'xx酒店',kehu:'张三',date:"2024-11-11"},
  {name:'xx酒店',kehu:'张三',date:"2024-11-11"},
  {name:'xx酒店',kehu:'张三',date:"2024-11-11"},
  {name:'xx酒店',kehu:'张三',date:"2024-11-11"},
  {name:'xx酒店',kehu:'张三',date:"2024-11-11"},
])

function toDetail(){
  uni.navigateTo({
    url:`/pages/baojia/baojiaDetail`
  })
}
</script>
<style scoped lang="scss">
.baojia-warp{
  @apply px-4 pt-3 h-[86vh] overflow-y-auto;
}
.baojia-box{
  @apply bg-white rounded px-4 py-2 grid grid-cols-2 text-gray-800 mb-2 border border-focus text-base;
  .name{
    @apply text-base;
  }
  .date{
    @apply text-sm text-gray-400;
  }

}
</style>